<html>

<head>
    <meta charset="utf-8">
    <title>关于我们的一切</title>
    <link rel="shortcut icon" href="https://img.icons8.com/?size=48&id=SkbzwdwhI2sy&format=png" type="image/x-icon">
    <style>
        html, body {
            height: 100%;
            padding: 0;
            margin: 0;
            background: #000;
            overflow: hidden;
            font-family: "Arial", sans-serif;
        }

        canvas {
            position: absolute;
            width: 100%;
            height: 100%;
        }

        .love-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            opacity: 0;
            font-size: 16px;
            padding-bottom: 80px;
            color: #ea80b0;
            text-shadow: 0 0 10px rgba(234, 128, 176, 0.5);
            transition: all 1s ease-in-out;
            white-space: nowrap;
            overflow: hidden;
            font-weight: bold;
            z-index: 1;
        }

        .love-text.fade-in {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1.1);
        }

        .love-text.fade-out {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.9);
        }

        .web_notice {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 99999;
            display: flex;
            align-items: center;
            justify-content: center;
            visibility: hidden;
            opacity: 0;
            transition: all 0.5s ease;
            backdrop-filter: blur(8px);
        }

        .web_notice > div {
            width: 450px;
            justify-self: center;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 40px;
            padding: 50px 30px;
        }

        .web_notice.visible {
            visibility: visible;
            opacity: 1;
        }

        .web_notice.visible > div {
            transform: translateY(0);
        }

        .web_notice h3 {
            font-weight: bold;
            text-align: center;
            font-size: 30px;
            color: #ea80b0;
            margin-bottom: 20px;
            text-shadow: 0 0 10px rgba(234, 128, 176, 0.5);
        }

        .love-input {
            width: 80%;
            padding: 15px 20px;
            margin: 20px auto;
            display: block;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(234, 128, 176, 0.3);
            border-radius: 15px;
            color: #ea80b0;
            font-size: 16px;
            transition: all 0.3s ease;
            resize: none;
            height: 100px;
            outline: none;
        }

        .love-input:focus {
            border-color: #ea80b0;
            box-shadow: 0 0 15px rgba(234, 128, 176, 0.3);
        }

        .close-btn {
            display: block;
            background: linear-gradient(45deg, #ea80b0, #e861a0);
            color: #FFF;
            text-align: center;
            font-weight: bold;
            font-size: 19px;
            line-height: 60px;
            margin: 45px auto 0;
            border-radius: 32px;
            width: 80%;
            text-decoration: none;
            transition: all 0.3s ease;
            cursor: pointer;
            box-shadow: 0 5px 15px rgba(234, 128, 176, 0.4);
        }

        .close-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(234, 128, 176, 0.6);
        }

        .floating-hearts {
            position: fixed;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 0;
        }

        .floating-heart {
            position: absolute;
            animation: floatHeart 10s linear infinite;
            opacity: 0.3;
            color: #ea80b0;
        }

        @keyframes floatHeart {
            0% {
                transform: translateY(100vh) scale(0);
                opacity: 0;
            }
            50% {
                opacity: 0.3;
            }
            100% {
                transform: translateY(-100px) scale(1);
                opacity: 0;
            }
        }

        .music-prompt {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(8px);
            padding: 12px 24px;
            border-radius: 50px;
            box-shadow: 0 4px 15px rgba(234, 128, 176, 0.3);
            cursor: pointer;
            z-index: 9999;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.3s ease;
            animation: float 2s ease-in-out infinite;
            border: 2px solid rgba(234, 128, 176, 0.3);
        }

        .music-prompt:hover {
            transform: translateX(-50%) scale(1.05);
            border-color: #ea80b0;
            box-shadow: 0 6px 20px rgba(234, 128, 176, 0.4);
        }

        .music-prompt.hidden {
            opacity: 0;
            transform: translateX(-50%) translateY(-20px);
            pointer-events: none;
        }

        .music-icon {
            width: 24px;
            height: 24px;
            animation: pulse 1.5s ease-in-out infinite;
        }

        .music-text {
            color: #ea80b0;
            font-size: 16px;
            font-weight: bold;
        }

        @keyframes pulse {
            0% {
                opacity: 0.5;
                transform: scale(0.95);
            }
            50% {
                opacity: 1;
                transform: scale(1.05);
            }
            100% {
                opacity: 0.5;
                transform: scale(0.95);
            }
        }

        @keyframes float {
            0%, 100% {
                transform: translateX(-50%) translateY(0px);
            }
            50% {
                transform: translateX(-50%) translateY(-10px);
            }
        }
    </style>
</head>
<body>

<div class="music-prompt" id="musicPrompt">
    <svg class="music-icon" viewBox="0 0 24 24" fill="none" stroke="#ea80b0" stroke-width="2">
        <path d="M9 18V5l12-2v13"></path>
        <circle cx="6" cy="18" r="3"></circle>
        <circle cx="18" cy="16" r="3"></circle>
    </svg>
    <span class="music-text">点击这里，让爱的旋律开始 💝</span>
</div>

<div class="floating-hearts" id="floatingHearts"></div>
<canvas id="pinkboard"></canvas>
<p id="love-text" class="love-text"></p>
<div class="web_notice" id="webNotice">
    <div>
        <h3>留下您的心里话</h3>
        <div style="text-align:center;color:#ea80b0;font-size:16px;">仅对我们可见 ❤️</div>
        <textarea class="love-input" id="loveInput" placeholder="在这写下您的心里话..."></textarea>
        <a class="close-btn" onclick="submitForm()">献上我的心意 💝</a>
    </div>
</div>


<script>
    // 移除原有的audio相关代码，替换为：
    var audio;
    const musicPrompt = document.getElementById('musicPrompt');
    let isPlaying = false;

    function playMusic() {
        if (!audio || audio.paused) {
            audio = new Audio('love.mp3');
            audio.volume = 0.2;
            audio.play().then(() => {
                isPlaying = true;
                musicPrompt.classList.add('hidden');
            }).catch(error => {
                console.error('播放失败:', error);
            });
        }
    }

    // 监听提示点击事件
    musicPrompt.addEventListener('click', playMusic);

    // 定期显示提示（如果音乐未播放）
    function togglePrompt() {
        if (!isPlaying) {
            musicPrompt.classList.toggle('hidden');
        }
    }

    // 每5秒切换提示的显示状态（如果音乐未播放）
    setInterval(() => {
        if (!isPlaying) {
            togglePrompt();
        }
    }, 5000);

    document.addEventListener('click', function () {
        playMusic();
    });
</script>

<script>
 var loveTexts = [
    "🦄",
    "嘘... 点一下屏幕\n让音乐为我们的故事伴奏 🎵",
    "你好，我是 Abudureyim.\n 叫我英名Evan也行呢~",
    "一个用代码写诗的程序员\n对生活，对你，都充满好奇与温柔 ✨", // "热爱"稍显直接，"好奇与温柔"更含蓄
    "如果你看到这些文字\n愿意对我说声“你很棒”吗？",
    "因为我想说...",
    "想和你一起听着同一段旋律\n感受心动的频率 🎧", // "同一副耳机" -> "同一段旋律" (更抽象，不暗示物理接近)
    "每当想起你的名字\n我的世界就会悄悄亮起星光 ⭐", // "别人提起" -> "想起" (更内心化)
    "也许我说不出多么优美的词句\n但遇见你是我记忆里闪亮的片段 🌟", // "生命中最美的意外" -> "记忆里闪亮的片段" (更轻盈，贴合短暂了解)
    "想和你分享每一次黄昏\n微甜的悸动，和拂面的晚风 🌅", // "夏日的晚霞" -> "每一次黄昏", "橘子汽水的清甜" -> "微甜的悸动" (去季节化)
    "从不懂得什么是喜欢\n直到遇见了你，才明白心动的模样 💫", // "感觉" -> "模样" (更形象)
    "偶然的相遇，却在思绪里反复播放\n每一帧都是笑容 📽️", // "短暂的相遇" -> "偶然的相遇" (淡化时间限制感)
    "想知道你此刻的心情如何？\n我这里飘着思念的细雨... ☁️", // "你那里的天气如何" -> "你此刻的心情如何", "下着想你的小雪" -> "飘着思念的细雨" (去具体天气)
    "在写满公式的草稿纸角落\n藏着我最想写下的那个名字 📝",
    "在这匆匆人海中\n有一颗心悄悄收藏着这份美好的悸动 💝", // "坚持珍藏着最美的悸动" -> "悄悄收藏着这份美好的悸动" (更柔和)
    "喜欢把那些悄悄的心意\n藏在每一句问候里 💌", // "爱意" -> "心意" (程度更合适)
    "听过最美的旋律\n不及你声音带来的暖意 🎼", // "轻声的呢喃" -> "声音带来的暖意" (更普适)
    "想把所有的温柔和美好\n都变成你眼中的星光 ✨",
    "推荐给你我爱的电影：\n《喜剧之王》- 给你欢笑\n《欢乐喜剧人》- 陪你开心\n《你的名字》- 带你感受心动", // "最爱的" -> "我爱的", "带你感动" -> "带你感受心动" (更贴合主题)
    "每一条看似普通的消息\n都是我悄悄传递的想念 💭", // "偷偷说着的我喜欢你" -> "悄悄传递的想念" (更含蓄温柔)
    "愿做你世界里\n一道温暖的光 ☀️", // "最温暖的那个夏天" -> "一道温暖的光" (去季节化)
    "默默许愿\n愿我的存在能成为你世界里温暖的星光 🌠", // "愿你的世界，只有我这个倾心于你的男孩" -> "愿我的存在能成为你世界里温暖的星光" (去掉独占感，更温柔祝福)
    "👽",
    "或许我还在积攒勇气的路上...",
    "对不起来晚了\n但我的心意一直在向你传递... 📡", // "一直在奔向你" -> "一直在向你传递" (弱化物理奔赴感)
    "愿你被这个世界温柔以待 💕",
    "你真诚的朋友 Abudureyim ✨" // "永远喜欢你的" -> "一直默默喜欢着你的" (更符合现实和含蓄)
];

    var loveTextElement = document.getElementById("love-text");
    var currentIndex = 0;

    // 添加CSS样式
    var style = document.createElement('style');
    style.textContent = `
    #love-text {
        text-align: center;
        width: 100%;
    }
    .love-line {
        display: block;
        line-height: 1.5;
        margin: 5px 0;
    }
`;
    document.head.appendChild(style);

    // 显示下一个文案
    function showNextLoveText() {
        // 将\n转换为居中的span标签
        const formattedText = loveTexts[currentIndex].split('\n').map(line =>
            `<span class="love-line">${line}</span>`
        ).join('');

        loveTextElement.innerHTML = formattedText;
        loveTextElement.style.opacity = 1;
        currentIndex++;

        if (currentIndex >= loveTexts.length) {
            setTimeout(showNotice, 1500);
            return;
        }
        setTimeout(hideLoveText, 3000);
    }

    // 隐藏文案
    function hideLoveText() {
        loveTextElement.style.opacity = 0;
        setTimeout(showNextLoveText, 1000);
    }

    // 初始隐藏文案
    loveTextElement.style.opacity = 0;

    // 开始显示文案
    showNextLoveText();

    // 显示通知
    function showNotice() {
        var notice = document.getElementById('webNotice');
        notice.style.visibility = 'visible';
        setTimeout(function () {
            notice.style.opacity = 1;
        }, 100);
    }

    // 关闭通知
    function closeNotice() {
        var notice = document.getElementById('webNotice');
        notice.style.visibility = 'hidden';
        setTimeout(function () {
            notice.style.opacity = 0;
        }, 100);
    }

    // 提交表单
    function submitForm() {
        // 获取textarea的内容
        var content = document.getElementById('loveInput').value;
        if (content == "") {
            document.getElementById('loveInput').placeholder = '嚄，我不信没有心里话呢...';
            return;
        }
        // 构建POST请求的参数
        var params = {
            user: 'loveme',
            pass: 'loveme',
            title: "系统：" + getOsInfo().name + "；浏览器：" + getBrowser(), // URL编码标题参数
            content: content, // URL编码内容参数
            keeper: '3487297072',
            api: 'app001'
        };

        // 构建请求的URL
        var url = 'https://uyclouds.com/uyapi/material_user_add.php';

        // 发送POST请求
        var xhr = new XMLHttpRequest();
        xhr.open('POST', url, true);
        xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
        /*xhr.onreadystatechange = function () {
            if (xhr.readyState === XMLHttpRequest.DONE) {
                if (xhr.status === 200) {
                    // 请求成功，处理返回的数据
                    var response = JSON.parse(xhr.responseText);
                    console.log(response.data);
                }
            }
        };*/

        // 将params对象转换为URL编码的字符串
        var paramsStr = Object.keys(params).map(function (key) {
            return key + '=' + params[key];
        }).join('&');

        // 发送请求
        xhr.send(paramsStr);
        closeNotice();
    }

    // 获取操作系统信息
    function getOsInfo() {
        var userAgent = navigator.userAgent.toLowerCase();
        var name = 'Unknown';
        var version = 'Unknown';
        if (userAgent.indexOf('win') > -1) {
            name = 'Windows';
            if (userAgent.indexOf('windows nt 5.0') > -1) {
                version = 'Windows 2000';
            } else if (userAgent.indexOf('windows nt 5.1') > -1 || userAgent.indexOf('windows nt 5.2') > -1) {
                version = 'Windows XP';
            } else if (userAgent.indexOf('windows nt 6.0') > -1) {
                version = 'Windows Vista';
            } else if (userAgent.indexOf('windows nt 6.1') > -1 || userAgent.indexOf('windows 7') > -1) {
                version = 'Windows 7';
            } else if (userAgent.indexOf('windows nt 6.2') > -1 || userAgent.indexOf('windows 8') > -1) {
                version = 'Windows 8';
            } else if (userAgent.indexOf('windows nt 6.3') > -1) {
                version = 'Windows 8.1';
            } else if (userAgent.indexOf('windows nt 6.2') > -1 || userAgent.indexOf('windows nt 10.0') > -1) {
                version = 'Windows 10';
            } else {
                version = 'Unknown';
            }
        } else if (userAgent.indexOf('iphone') > -1) {
            name = 'iPhone';
        } else if (userAgent.indexOf('mac') > -1) {
            name = 'Mac';
        } else if (userAgent.indexOf('x11') > -1 || userAgent.indexOf('unix') > -1 || userAgent.indexOf('sunname') > -1 || userAgent.indexOf('bsd') > -1) {
            name = 'Unix';
        } else if (userAgent.indexOf('linux') > -1) {
            if (userAgent.indexOf('android') > -1) {
                name = 'Android';
            } else {
                name = 'Linux';
            }
        } else {
            name = 'Unknown';
        }
        return {name, version};
    }

    // 获取浏览器信息
    function getBrowser() {
        var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串


        var isIE11 = userAgent.toLowerCase().match(/rv:([\d.]+)\) like gecko/); // IE 11中userAgent已经不包含'msie'所以用'msie'不能判断IE 11
        var isOpera = userAgent.indexOf("Opera") > -1; //判断是否Opera浏览器
        var isIE = (userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera) || isIE11; //判断是否IE浏览器
        var isEdge = userAgent.indexOf("Edge") > -1; //判断是否IE的Edge浏览器
        var isFF = userAgent.indexOf("Firefox") > -1; //判断是否Firefox浏览器
        var isSafari = userAgent.indexOf("Safari") > -1
            && userAgent.indexOf("Chrome") == -1; //判断是否Safari浏览器
        var isChrome = userAgent.indexOf("Chrome") > -1
            && userAgent.indexOf("Safari") > -1; //判断Chrome浏览器

        if (isIE) {
            var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
            reIE.test(userAgent);
            var fIEVersion = parseFloat(userAgent.match(/MSIE ([0-9.]+)/)[1]);

            if (fIEVersion == 7) {
                return "IE7";
            } else if (fIEVersion == 8) {
                return "IE8";
            } else if (fIEVersion == 9) {
                return "IE9";
            } else if (fIEVersion == 10) {
                return "IE10";
            } else if (isIE11) { // IE 11中userAgent已经不包含'msie'所以用'msie'不能判断IE 11
                return "IE11";
            } else {
                return "IE";
            }//IE版本过低
        }
        if (isOpera) {
            return "Opera";
        }
        if (isEdge) {
            return "Edge";
        }
        if (isFF) {
            return "Firefox";
        }
        if (isSafari) {
            return "Safari";
        }
        if (isChrome) {
            return "Chrome";
        }
        return '--'
    };

    // 创建漂浮爱心
    function createFloatingHearts() {
        const container = document.getElementById('floatingHearts');
        const hearts = ['❤️', '💖', '💝', '💕', '💗'];

        setInterval(() => {
            const heart = document.createElement('span');
            heart.className = 'floating-heart';
            heart.textContent = hearts[Math.floor(Math.random() * hearts.length)];
            heart.style.left = Math.random() * 100 + 'vw';
            heart.style.fontSize = (Math.random() * 20 + 25) + 'px';
            heart.style.animationDuration = (Math.random() * 5 + 5) + 's';
            container.appendChild(heart);

            setTimeout(() => {
                heart.remove();
            }, 10000);
        }, 500);
    }

    createFloatingHearts();
</script>
<script>
    var settings = {
        particles: {
            length: 500,
            duration: 2,
            velocity: 100,
            effect: -0.75,
            size: 32,
        },
    };
    (function () {
        var b = 0;
        var c = ["ms", "moz", "webkit", "o"];
        for (var a = 0; a < c.length && !window.requestAnimationFrame; ++a) {
            window.requestAnimationFrame = window[c[a] + "RequestAnimationFrame"];
            window.cancelAnimationFrame = window[c[a] + "CancelAnimationFrame"] || window[c[a] + "CancelRequestAnimationFrame"]
        }
        if (!window.requestAnimationFrame) {
            window.requestAnimationFrame = function (h, e) {
                var d = new Date().getTime();
                var f = Math.max(0, 16 - (d - b));
                var g = window.setTimeout(function () {
                    h(d + f)
                }, f);
                b = d + f;
                return g
            }
        }
        if (!window.cancelAnimationFrame) {
            window.cancelAnimationFrame = function (d) {
                clearTimeout(d)
            }
        }
    }());

    var Point = (function () {
        function Point(x, y) {
            this.x = (typeof x !== 'undefined') ? x : 0;
            this.y = (typeof y !== 'undefined') ? y : 0;
        }

        Point.prototype.clone = function () {
            return new Point(this.x, this.y);
        };
        Point.prototype.length = function (length) {
            if (typeof length == 'undefined')
                return Math.sqrt(this.x * this.x + this.y * this.y);
            this.normalize();
            this.x *= length;
            this.y *= length;
            return this;
        };
        Point.prototype.normalize = function () {
            var length = this.length();
            this.x /= length;
            this.y /= length;
            return this;
        };
        return Point;
    })();
    var Particle = (function () {
        function Particle() {
            this.position = new Point();
            this.velocity = new Point();
            this.acceleration = new Point();
            this.age = 0;
        }

        Particle.prototype.initialize = function (x, y, dx, dy) {
            this.position.x = x;
            this.position.y = y;
            this.velocity.x = dx;
            this.velocity.y = dy;
            this.acceleration.x = dx * settings.particles.effect;
            this.acceleration.y = dy * settings.particles.effect;
            this.age = 0;
        };
        Particle.prototype.update = function (deltaTime) {
            this.position.x += this.velocity.x * deltaTime;
            this.position.y += this.velocity.y * deltaTime;
            this.velocity.x += this.acceleration.x * deltaTime;
            this.velocity.y += this.acceleration.y * deltaTime;
            this.age += deltaTime;
        };
        Particle.prototype.draw = function (context, image) {
            function ease(t) {
                return (--t) * t * t + 1;
            }

            var size = image.width * ease(this.age / settings.particles.duration);
            context.globalAlpha = 1 - this.age / settings.particles.duration;
            context.drawImage(image, this.position.x - size / 2, this.position.y - size / 2, size, size);
        };
        return Particle;
    })();
    var ParticlePool = (function () {
        var particles,
            firstActive = 0,
            firstFree = 0,
            duration = settings.particles.duration;

        function ParticlePool(length) {
            // create and populate particle pool
            particles = new Array(length);
            for (var i = 0; i < particles.length; i++)
                particles[i] = new Particle();
        }

        ParticlePool.prototype.add = function (x, y, dx, dy) {
            particles[firstFree].initialize(x, y, dx, dy);
            // handle circular queue
            firstFree++;
            if (firstFree == particles.length) firstFree = 0;
            if (firstActive == firstFree) firstActive++;
            if (firstActive == particles.length) firstActive = 0;
        };
        ParticlePool.prototype.update = function (deltaTime) {
            var i;
            // update active particles
            if (firstActive < firstFree) {
                for (i = firstActive; i < firstFree; i++)
                    particles[i].update(deltaTime);
            }
            if (firstFree < firstActive) {
                for (i = firstActive; i < particles.length; i++)
                    particles[i].update(deltaTime);
                for (i = 0; i < firstFree; i++)
                    particles[i].update(deltaTime);
            }
            // remove inactive particles
            while (particles[firstActive].age >= duration && firstActive != firstFree) {
                firstActive++;
                if (firstActive == particles.length) firstActive = 0;
            }
        };
        ParticlePool.prototype.draw = function (context, image) {
            // draw active particles
            if (firstActive < firstFree) {
                for (i = firstActive; i < firstFree; i++)
                    particles[i].draw(context, image);
            }
            if (firstFree < firstActive) {
                for (i = firstActive; i < particles.length; i++)
                    particles[i].draw(context, image);
                for (i = 0; i < firstFree; i++)
                    particles[i].draw(context, image);
            }
        };
        return ParticlePool;
    })();
    (function (canvas) {
        var context = canvas.getContext('2d'),
            particles = new ParticlePool(settings.particles.length),
            particleRate = settings.particles.length / settings.particles.duration, // particles/sec
            time;

        // get point on heart with -PI <= t <= PI
        function pointOnHeart(t) {
            return new Point(
                160 * Math.pow(Math.sin(t), 3),
                130 * Math.cos(t) - 50 * Math.cos(2 * t) - 20 * Math.cos(3 * t) - 10 * Math.cos(4 * t) + 25
            );
        }

        // creating the particle image using a dummy canvas
        var image = (function () {
            var canvas = document.createElement('canvas'),
                context = canvas.getContext('2d');
            canvas.width = settings.particles.size;
            canvas.height = settings.particles.size;

            // helper function to create the path
            function to(t) {
                var point = pointOnHeart(t);
                point.x = settings.particles.size / 2 + point.x * settings.particles.size / 350;
                point.y = settings.particles.size / 2 - point.y * settings.particles.size / 350;
                return point;
            }

            // create the path
            context.beginPath();
            var t = -Math.PI;
            var point = to(t);
            context.moveTo(point.x, point.y);
            while (t < Math.PI) {
                t += 0.01; // baby steps!
                point = to(t);
                context.lineTo(point.x, point.y);
            }
            context.closePath();
            // create the fill
            context.fillStyle = '#ea80b0';
            context.fill();
            // create the image
            var image = new Image();
            image.src = canvas.toDataURL();
            return image;
        })();

        // render that thing!
        function render() {
            // next animation frame
            requestAnimationFrame(render);
            // update time
            var newTime = new Date().getTime() / 1000,
                deltaTime = newTime - (time || newTime);
            time = newTime;
            // clear canvas
            context.clearRect(0, 0, canvas.width, canvas.height);
            // create new particles
            var amount = particleRate * deltaTime;
            for (var i = 0; i < amount; i++) {
                var pos = pointOnHeart(Math.PI - 2 * Math.PI * Math.random());
                var dir = pos.clone().length(settings.particles.velocity);
                particles.add(canvas.width / 2 + pos.x, canvas.height / 2 - pos.y, dir.x, -dir.y);
            }
            // update and draw particles
            particles.update(deltaTime);
            particles.draw(context, image);
        }

        // handle (re-)sizing of the canvas
        function onResize() {
            canvas.width = canvas.clientWidth;
            canvas.height = canvas.clientHeight;
        }

        window.onresize = onResize;
        // delay rendering bootstrap
        setTimeout(function () {
            onResize();
            render();
        }, 10);
    })(document.getElementById('pinkboard'));
</script>
</body>

</html>